package com.yigo.cuc.api.constant;

import com.yigo.framework.http.ErrorCode;
import com.yigo.framework.util.I18nUtil;
import lombok.AllArgsConstructor;

import java.util.*;

/**
 * @author chenzl
 */
@AllArgsConstructor
public enum CusCodeEnum implements ErrorCode {
    /**
     * 注册用户已存在：用户名[{0}]邮箱[{1}]手机号[{2}]
     */
    REGISTER_USER_EXISTS("CUS-100001");

    private String code;

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg(Object... args) {
        return I18nUtil.getMsg(Locale.getDefault(), "i18n/cus_msg", code, args);
    }
}
